#!/usr/bin/env python3

import re

f = open("access.log")
#p = re.compile('\[.*\]')
#for i in f:
#    print (p.findall(i))


month = ['zero', 'Jan', 'Feb', 'Mar','Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep','Oct','Nov','Dec']

fn = re.compile(r'(a.*-)([0-9]{2})([A-Z][a-z]{2})(2[0-9]{3})')
for i in fn:
    nn = fn_re.search(i)
    new_name = nn.group(1)+nn.group(4)+month.index('%s'%nn.group(3))+nn.group(2)
    print(new_name)
